package com.sirun.cn.fca.module.main.home.temp.control;

import com.sirun.cn.fca.module.main.home.temp.control.constant.ControlActionConst;
import com.tencent.cloud.iov.action.IActionListener;
import com.tencent.cloud.iov.util.rx.SimpleObserver;

import io.reactivex.disposables.Disposable;

public class ControlObserver extends SimpleObserver<String> {
    private IActionListener mActionListener;

    public ControlObserver(IActionListener actionListener) {
        mActionListener = actionListener;
    }

    @Override
    public void onSubscribe(Disposable d) {
        super.onSubscribe(d);
    }

    @Override
    public void onNext(String initInfo) {
        super.onNext(initInfo);
        mActionListener.onAction(ControlActionConst.Normal.ACTION_INIT_DATA, initInfo);
    }

    @Override
    public void onError(Throwable e) {
        super.onError(e);
    }

    @Override
    public void onComplete() {
        super.onComplete();
    }
}
